{template 'common/header'}
<div id="louie" class="row" data-url="{php echo $this->createWebUrl('api')}">

    <!--S头部导航-->
    <ul class="nav nav-tabs">
        <li :class="item.active == 1 ? 'active' :''" v-for="(item,index) in nav" @click="changeNav(index)"><a href="javascript:;"><i :class="item.icon"></i> {{item.name}}</a></li>
    </ul>
    <!--E头部导航-->

    <!--S列表-->
    <div id="list" v-if="nav[nav_index].value == 'list' || nav[nav_index].value == 'audit' || nav[nav_index].value == 'forbid'">

        <!--S搜索-->
        <div class="form-group louie-search">
            <input type="text" v-model="search_keyword" class="form-control" placeholder="搜索内容" />
            <select class="form-control" v-model="search_type">
                <option value="id">搜索id</option>
                <option value="name">门店名称</option>
            </select>
            <button type="button" class="btn btn-default" @click="searchSubmit">搜索</button>
        </div>
        <!--E搜索-->

        <table class="table table-hover table-bordered" v-if="list.length > 0">
            <tr><th>门店id</th><th>门店名</th><th>logo</th><th>地址</th><th>经营范围</th><th v-if="nav[nav_index].value != 'audit'">锁定</th><th>操作</th></tr>
<!--            <tr>-->
<!--                <td>1</td>-->
<!--                <td>门店名字门店名字门店名字门店名字门店名字门店名字</td>-->
<!--                <td class="logo"><img src="https://www.baidu.com/img/bd_logo1.png?where=super" /></td>-->
<!--                <td>地址地址地址地址</td>-->
<!--                <td class="sell_range"><button class="btn btn-info btn-xs">童装童装童</button><button class="btn btn-info btn-xs">童装童装童</button><button class="btn btn-info btn-xs">童装童装童</button><button class="btn btn-info btn-xs">童装童装童</button><button class="btn btn-info btn-xs">童装童装童</button></td>-->
<!--                <td class="lock"><button class="btn btn-info btn-xs"><i class="iconfont icon-jiesuobianjiquyu"></i></button></td>-->
<!--                <td><button class="btn btn-danger btn-sm">删除</button></td>-->
<!--            </tr>-->
            <tr v-for="(item,index) in list">
                <td>{{item.id}}</td>
                <td>{{item.name}}</td>
                <td class="logo"><img :src="item.logo" /></td>
                <td>{{item.address}}</td>
                <td class="sell_range"><button class="btn btn-info btn-xs" v-for="itema in item.sell_range">{{itema.name}}</button></td>
                <td class="lock" v-if="nav[nav_index].value != 'audit'">
                    <button v-if="nav[nav_index].value == 'list'" class="btn btn-info btn-xs" @click="clickLock(index)"><i class="iconfont icon-jiesuobianjiquyu"></i></button>
                    <button v-else="nav[nav_index].value == 'forbid'" class="btn btn-info btn-xs" @click="clickUnLock(index)"><i class="iconfont icon-suodingbianjiquyu"></i></button>
                </td>
                <td>
                    <div class="btn-group btn-group-sm">
                        <button class="btn btn-info" v-if="nav[nav_index].value == 'audit'" @click="clickPass(index)">通过</button>
                        <button class="btn btn-success" v-if="nav[nav_index].value == 'audit'" @click="clickRefuse(index)">拒绝</button>
                        <button class="btn btn-danger" @click="clickDelete(index)" v-if="nav[nav_index].value == 'audit' || nav[nav_index].value == 'list' || nav[nav_index].value == 'forbid'">删除</button>
                    </div>
                </td>
            </tr>
        </table>
        <h6 v-else style="font-size:30px;text-align: center;color:#ccc;margin-top:40px;">暂无数据</h6>
        <paging v-on:change-page="changePage" v-bind:total="total" v-bind:return-num="returnNum"></paging>
    </div>
    <!--E列表-->

    <!--S经营范围-->
    <div id="manage" v-if="nav[nav_index].value == 'manage'">
        <ul class="nav">
<!--            <li class="active">经营范围</li><li>等待审核</li>-->
                <li v-for="(item,index) in manage_nav" :class="item.active == 1 ? 'active' : ''" @click="changeManageNav(index)">{{item.name}}</li>
                <!--S添加新经营范围-->
                <div class="form-group louie-search">
                    <input type="text" v-model.trim="manage_name" class="form-control" placeholder="请输入新增的经营范围" />
                    <button type="button" class="btn btn-default" @click="addManage">添加</button>
                </div>
                <!--E添加新经营范围-->
        </ul>
        <ul class="manage">
            <li v-for="(item,index) in manage_list" @click="clickManage(index)">{{item.name}}</li>
        </ul>
    </div>
    <!--E经营范围-->

    <!--S提示框-->
    <v-dialog style="z-index:9999999;"/>
    <!--E提示框-->

</div>
<script src="../addons/kuyuan_vbz/dist/web/store-list.js"></script>
{template 'common/footer'}